package org.cafeanimal.sqlite.util;

import java.util.Iterator;

/**
 *
 * @author michael
 */
public class Strings {

    public static String concat(Iterable<String> strings, String delim) {
        Iterator<String> iter = strings.iterator();
        StringBuilder sb = new StringBuilder();
        
        while (iter.hasNext()) {
            sb.append(iter.next());
            if (iter.hasNext()) {
                sb.append(delim);
            }
        }
        
        return sb.toString();
    }

}
